﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace DocumentBuilder.Controls
{
    public class TextControl : IControl
    {
        public string Text { get; private set; }

        private TextControl()
        {

        }

        public static TextControl Create(Document context, XmlNode controlNode)
        {
            var textControl = new TextControl();
            textControl.Text = controlNode.Value;

            return textControl;
        }

        #region IControl Members

        public void PaintHtmlString(StringBuilder htmlCanvas)
        {
            htmlCanvas.AppendLine(Text);
        }

        #endregion
    }
}
